Move uuid back into main domain dir.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 14 Sep 2005 13:37:03 +0000 (13:37 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 14 Sep 2005 13:37:03 +0000 (13:37 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/image.py

index 9ee5cb57fa28d74a115dd38fccdc738d5190d161..1464e488ae1649b7c135f6dbc15154b8ce374fdf 100644 (file)
@@ -142,7 +142,7 @@ class XendDomain:
                 domdb.delete()
             elif domid in doms:
                 try:
-                    self._new_domain(db.uuid, db, doms[domid]) 
+                    self._new_domain(domdb["uuid"].getData(), db, doms[domid]) 
                 except Exception, ex:
                     log.exception("Error recreating domain info: id=%d", domid)
                     self._delete_domain(domid)
index 8ac581241d8f26f3db85c313dd97184c75cdc8f4..5b5dca60d61a902c754bc9c48e6f121f6be6f346 100644 (file)
@@ -205,7 +205,6 @@ class XendDomainInfo:
     __exports__ = [
         DBVar('id',            ty='int'),
         DBVar('name',          ty='str'),
-        DBVar('uuid',          ty='str'),
         DBVar('config',        ty='sxpr'),
         DBVar('start_time',    ty='float'),
         DBVar('state',         ty='str'),
@@ -219,6 +218,7 @@ class XendDomainInfo:
     def __init__(self, uuid, path, db):
         self.uuid = uuid
         self.path = path + "/" + uuid
+
         self.db = db
 
         self.recreate = 0
@@ -264,6 +264,8 @@ class XendDomainInfo:
         self.bootloader = None
         self.device_model_pid = 0
 
+        xstransact.Write(self.path, "uuid", self.uuid)
+
     def setDB(self, db):
         self.db = db
 
index 1c0dabfadeb5f668d7c28e84c123d1b55addb98c..cd9c625a685ce10d2d5a5d764ceda8c8df459884 100644 (file)
@@ -155,7 +155,6 @@ class ImageHandler:
             if dom <= 0:
                 raise VmError('Creating domain failed: name=%s' % self.vm.name)
         log.debug("initDomain: cpu=%d mem_kb=%d ssidref=%d dom=%d", cpu, mem_kb, ssidref, dom)
-        # xc.domain_setuuid(dom, uuid)
         xc.domain_setcpuweight(dom, cpu_weight)
         xc.domain_setmaxmem(dom, mem_kb)